<?php

	exit('1');

	ini_set('max_execution_time', '0');
	require('sql.class.php');


	$p = MyPdo::init();
	$op =  opendir('./fang');
	$i = 0;
	while($f = readdir($op)){
		if($f == '.'|| $f == '..'){
			continue;
		}
		$path = './fang/'.$f;
		$info = json_decode(file_get_contents($path),1);
		$sql = 'insert into fang values(null,?,?,?)';
		$res = $p->dml($sql,array($info['ming'],$info['fang'],$info['gong']));
		dump($res);
	}










function dump($s,$t=false){
	echo '<pre>';
		var_dump($s);
	echo '</pre>';
	if($t){
		exit;
	}
}
